-- GENERATED SPELL FOR [Darkscreecher Akkarai] --


function spell0_23161(pUnit, Event) --@Blink,Self--
pUnit:FullCastSpellOnTarget(38981,pUnit)
pUnit:RegisterEvent('Sorts_23161', 1320, 1)
end

function spell1_23161(pUnit, Event) --@Curse of Mending,n/a--
pUnit:FullCastSpellOnTarget(15730,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23161', 2000, 1)
end

function spell2_23161(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(13341,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23161', 521, 1)
end

function spell3_23161(pUnit, Event) --@Flock Call,n/a--
pUnit:FullCastSpellOnTarget(40427,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23161', 1000, 1)
end

function spell4_23161(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(40429,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23161', 6000, 1)
end

function spell5_23161(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(40430,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23161', 6000, 1)
end

function spell6_23161(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(40428,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23161', 3000, 1)
end

function Sorts_23161(pUnit, Event)
local choix_sorts_23161 = math.random(0, 6)
if choix_sorts_23161 == 0 then
pUnit:RegisterEvent('spell0_23161', 1, 1)
end
if choix_sorts_23161 == 1 then
pUnit:RegisterEvent('spell1_23161', 1, 1)
end
if choix_sorts_23161 == 2 then
pUnit:RegisterEvent('spell2_23161', 1, 1)
end
if choix_sorts_23161 == 3 then
pUnit:RegisterEvent('spell3_23161', 1, 1)
end
if choix_sorts_23161 == 4 then
pUnit:RegisterEvent('spell4_23161', 1, 1)
end
if choix_sorts_23161 == 5 then
pUnit:RegisterEvent('spell5_23161', 1, 1)
end
if choix_sorts_23161 == 6 then
pUnit:RegisterEvent('spell6_23161', 1, 1)
end
end

function mob23161_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23161', math.random(1500, 3000), 1)
end

function mob23161_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23161_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23161_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23161, 1, 'mob23161_Action')
RegisterUnitEvent(23161, 2, 'mob23161_Leave')
RegisterUnitEvent(23161, 3, 'mob23161_Kill')
RegisterUnitEvent(23161, 4, 'mob23161_Die')
